]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Don't show the context-menu when the tray isn't open
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 18 Mar 2013 17:49:53 +0000 (13:49 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 15 Apr 2013 16:49:30 +0000 (12:49 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=697709

js/ui/messageTray.js

index 14343cb96dce800393e2f938c30a71e2a1373661..98724c58dd8f328615c0748ede015e131bd4e47d 100644 (file)
@@ -1721,6 +1721,9 @@ const MessageTray = new Lang.Class({
         this.actor.add_action(clickAction);
 
         clickAction.connect('clicked', Lang.bind(this, function(action) {
+            if (this._trayState != State.SHOWN)
+                return;
+
             let button = action.get_button();
             if (button == 3)
                 this._openContextMenu();
@@ -1731,7 +1734,7 @@ const MessageTray = new Lang.Class({
         clickAction.connect('long-press', Lang.bind(this, function(action, actor, state) {
             switch (state) {
             case Clutter.LongPressState.QUERY:
-                return true;
+                return this._trayState == State.SHOWN;
             case Clutter.LongPressState.ACTIVATE:
                 this._openContextMenu();
             }